package com.yufan.dao.sharding;

import com.yufan.dto.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TestMapping {

    @Insert("insert into t_order(order_id,user_id,order_name) values(#{orderId},#{userId},#{orderName})")
    int addOrder(Order order);

    @Select("select * from  t_order")
    List<Order> findOrders();
}
